home *** CD-ROM | disk | FTP | other *** search
/ Dr. Windows 3 / dr win3.zip / dr win3 / VISUALBA / MLIST4.ZIP / READ.ME < prev    next >
Text File  |  1994-02-24  |  22KB  |  578 lines

  1. ***************************************************************************
  2. *
  3. *  McKean Consulting
  4. *  Robin W. McKean
  5. *  1042 Braddock Circle
  6. *  Woodstock GA  30188
  7. *
  8. *  MLIST.VBX    V4.11.0000
  9. *
  10. *  Multi-Purpose List Box Control for Visual Basic 3.0
  11. *
  12. ***************************************************************************
  13.  
  14. MLIST is a custom control for managing the way your data appears in a list
  15. box.  MLIST is a property for property replacement of the standard List Box
  16. control which comes with Visual Basic 3.0.  In addition, there are many more
  17. features which MLIST can do that you can't do with the normal List Box.  Some
  18. of these features are:
  19.  
  20.     * Set up owner draw columnar data in the list box.  This is NOT a
  21.       MULTI-COLUMN list box.  MLIST now has this feature, but the MLIST
  22.       List Box scrolls vertically, like a normal list box.  Your data is
  23.       arranged in columns, with specific drawing flags setup for each
  24.       "Drawing Region".  Think of each line as being broken up into
  25.       different areas, each with its own drawing flags and data.
  26.  
  27.     * Make a drawing region a bitmap or a checkbox.  You have control
  28.       over the entire list's bitmaps through the default bitmap property,
  29.       or you can set individual lines bitmap properties.
  30.  
  31.     * Control individual line colors in the list box
  32.  
  33.     * Total control over the checked and unchecked states of lines
  34.  
  35.     * Now MLIST has aligned bitmaps as well.  You specifiy the bitmap,
  36.       the text, and the alignment (top, bottom, right, left), and MLIST
  37.       will draw the text and the bitmap in the area you define.
  38.  
  39.     * New in verions 4.00.  You can now have true MUTLIPLE COLUMN list
  40.       boxes, with bitmaps and check boxes.  Multiple columns are set
  41.       up through setting the LBS_MULTICOLUMN style for the list box.
  42.       You control the width of each item.  This attribute differs in
  43.       that each line has a certain width.  So it may take two or more
  44.       columns of items to actually fill a line
  45.  
  46.     * Checking and Selecting a range of line items
  47.  
  48.     * Properties to find closest match and find exact matches in the
  49.       list box.
  50.  
  51.     * Complete control over colors in the list box.  Colors can be
  52.       set for normal lines, individual lines, normal highlight colors,
  53.       and individual highlight colors.
  54.  
  55.     * MList V4.10 now has 3-D effects
  56.  
  57.     * You can now setup vertical and horizontal grids
  58.  
  59. ***************************************************************************
  60.  
  61. This ZIP file contains:
  62.  
  63.     MLIST.VBX         VB version of the MLIST custom control
  64.     PROJECT1.MAK    Sample project file for MLIST
  65.     FORM1.FRM        Form used by the sample project
  66.     READ.ME            This file
  67.     PLUS.BMP        Bitmap used in example
  68.     PAGE.BMP        Ditto
  69.  
  70.     FINDSTR.MAK        FindString and FindStringExact Demo
  71.     FIND1.FRM        Form for FindString Demo
  72.  
  73. ***************************************************************************
  74.  
  75. REGISTRATION
  76.  
  77. Time for the sob story.  This Multi-Column List Box is Shareware.  It is
  78. NOT crippled in anyway.  When you download this custom control, you have
  79. the same custom control that I am using in my everyday VB programming.
  80. As a Shareware contributor, I am counting on the honor and moral fiber of
  81. every person who downloads this custom control to do the right thing.  I
  82. have contributed and participated in the Shareware arena for years now.
  83. Your small contribution can make a difference to me and my family...
  84.  
  85. Right now, the maximum string size in the List Box is 255 characters.  Let me
  86. know if this causes a problem.  I don't anticipate anyone needing to display
  87. more than this number of characters to the screen.
  88.  
  89. If you like and appreciate this custom control...
  90.  
  91.   1)  Small time developers like me, send $10.00 to the address listed above
  92.   2)  Corporate users send $15.00 to the address listed above
  93.   3)  Register in the Compuserve SWREG forum ID 1585
  94.  
  95. Registered users may purchase the source...
  96.  
  97.   Send $35.00 to me at the above address.
  98.  
  99.   This control is written in C++ and has been compiled using both
  100.   Borland C++ 3.1 and Visual C++ 1.0.
  101.  
  102. You may now register this control in the SWREG on Compuserve.  Type GO SWREG.
  103. If you want the source, you will still have to write me...
  104.  
  105. Corporate users should register via mail.
  106.  
  107. ***************************************************************************
  108.  
  109. WARRANTY
  110.  
  111. The control, as is, works the way that I want it to.  This does not mean
  112. that it will work the way that you want it to.   Along those lines, I
  113. totally disclaim that the control will do anything whatsoever.  This
  114. includes any implied abilities and any WARRANTIES, including those for
  115. SUITABILITY for a particular purpose, MERCHANTIBILITY, and all that other
  116. bull crap.
  117.  
  118. ***************************************************************************
  119.  
  120. PROGRAMMER'S NOTES (or, what I need to know to use this custom control)
  121.  
  122. The Multi-Column List Box is an enhanced List Box control.  The following
  123. is a desciption of each additional control.  What it does, and how to
  124. use it in your own VB programming.  For additional control properties, see
  125. those for properties included in the standard list box control.  MLIST now
  126. contains all standard controls.  The ones listed below are additions.
  127.  
  128. ItemHeight
  129.  
  130. This property is responsible for controlling the height of each individual
  131. line item in the list box.  It defaults to 195 Twips, the height of the
  132. font used by the standard list box.  You should adjust this height if you
  133. change the font, font size, etc..
  134.  
  135. I'm not sure whether or not this property will change the height of the lines
  136. after the list box has already been created.  I did not design the list box
  137. control to have the height of the items change dynamically.  Set the height
  138. of this item at design time, and the font, and your list box will be fine.
  139. Experiment with this during run-time if you like, and let me know how it
  140. works out, and how I can make this item work more to your liking.
  141.  
  142. DrawRegions
  143.  
  144. This item determines the number of drawing regions on each line.  This is
  145. basically equivelent to the number of COLUMNS, but this list box will still
  146. scroll like a normal list box.  When setting this property, the control
  147. clears the flags for the draw regions and sets them to left aligned, single
  148. line, and centered vertically.  Consult the Windows API for DrawText to
  149. see what exactly these flags mean.
  150.  
  151. ItemLength
  152.  
  153. This is an indexed property which corresponds to the length of each drawing
  154. region.  If you want a drawing region to be a specific length, set that
  155. drawing region's length to the desired setting in twips.  For example...
  156.  
  157.     MList1.DrawRegions = 2
  158.     MList.ItemLength(1) = 500
  159.     MList.ItemLength(2) = 500
  160.  
  161.     ' Generates an out of index error
  162.     MList1.ItemLength(0) = XXX
  163.     MList1.ItemLength(3) = XXX
  164.  
  165. It is probably a good idea to set the lengths of all drawing regions when you
  166. are changing the defaults.
  167.  
  168. DrawFlags
  169.  
  170. This is an indexed property which corresponds to the flags of each drawing
  171. region.  If you want a drawing region to be drawn in a specific manner, set
  172. that drawing region's flags to the desired settings.  For specific flags,
  173. look up the DrawText API function in the Windows API Reference.  In the
  174. following example, I setup two drawing regions and set the second drawing
  175. region's flags to right justify the text.  In this example, the second
  176. drawing region displays currency values.
  177.  
  178.     Const DT_RIGHT = 2
  179.     Const DT_VCENTER = 4
  180.     Const DT_SINGLELINE = 32
  181.  
  182.     MList1.DrawRegions = 2
  183.     MList1.Flags(2) = DT_RIGHT + DT_VCENTER + DT_SINGLELINE
  184.     MList.ItemLength(1) = 500
  185.     MList.ItemLength(2) = 500
  186.  
  187. If you are planning to include the '&' character in your strings, you
  188. should include the DT_NOPREFIX flag to avoid the underline.  I do NOT 
  189. automatically add this flag for you, as I want you to have total control 
  190. over the flags.
  191.  
  192. ActiveRegion
  193.  
  194. Setting this property affects the next two properties.  It defines the
  195. DrawingRegion (or index or column) that TextRegion and ListRegion will
  196. return.  Perhaps an example is in order.
  197.  
  198. My list box is divided up into three columns, name, account number, dollar
  199. amount.  I want t